package cn.hy.dataSync.config;

import cn.hy.dataSync.statistics.container.communicator.AbstractContainerCommunicator;
import org.apache.commons.lang.Validate;


/**
 * 顶级接口用于
 */
public abstract class AbstractTaskContainer {
    protected TaskConfig taskConfig;

    // task 任务 协调器容器
    protected AbstractContainerCommunicator containerCommunicator;

    public AbstractTaskContainer(TaskConfig taskConfig, AbstractContainerCommunicator containerCommunicator) {
        Validate.notNull(taskConfig, "taskConfig 不能为空");
        Validate.notNull(containerCommunicator, "containerCommunicator 不能为空");
        this.taskConfig = taskConfig;
        this.containerCommunicator = containerCommunicator;
    }

    public TaskConfig getTaskConfig() {
        return taskConfig;
    }

    /**
     * 任务启动
     */
    public abstract void start();
}
